#include <string.h>
#include <iostream>
using std::cout;
using std::endl;

#define MAX "hello"

void test0(){
    char arr[6] = {'h','e','l','l','o','\0'};
    cout << arr << endl;
    cout << arr + 1 << endl;

    char arr2[] = {'h','e','l','l','o'};
    char arr3[] = "hello";
    cout << arr2 << endl;
    cout << arr3 << endl;


    const char * pstr = "world";
    /* pstr[0] = 'W'; */
    cout << pstr << endl;

    /* cout << MAX - 1 << endl; */
    //const char * p = "hello"
    //p + 1
    /* cout << "hello" + 1 << endl; */

    char * p = new char[strlen(pstr) + 1]();
    strcpy(p,pstr);
    cout << p << endl;
    delete [] p;
    p = nullptr;

}

void test1(){
    int a = 1,b = 2,c = 3;
    int arr[3] = {a,b,c};
    cout << &a << endl;
    cout << arr << endl;
}

int main(void){
    test0();
    return 0;
}
